package com.jarvan.service;

import com.jarvan.dto.TicketDto;
import com.jarvan.form.TicketForm;
import com.jarvan.model.Ticket;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface TicketService {
    TicketDto save(TicketForm ticketForm);
    Ticket findById(String ticketId);
    Page<Ticket> findAllByTrainId(String ticketId, Pageable pageable);
    Page<Ticket> findAll(Pageable pageable);
    List<Ticket> findAllByBuyer(Integer buyerId);
    List<Ticket> findAllByTrainAndDate(String trainId, String date);
    List<Ticket> findAllByBuyerAndStatus(Integer buyerId, Integer status);
    Page<Ticket> findAllByTicketStatus(Pageable pageable, Integer status);
    void update(Ticket ticket);
    Page<Ticket> findAllByBuyerId(Integer buyerId, Pageable pageable);
    Page<Ticket> findAllByPayStatus(Integer payStatus, Pageable pageable);
}
